package com.erp.module.dingDan.prodyctionClient

import android.util.Log
import android.view.View
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentTransaction
import com.erp.activity.BaseActivity
import com.erp.R
import com.erp.module.crm.xXCrm.FragmentClientfive
import kotlinx.android.synthetic.main.header_knoya.*

/**
 * Created by Administrator on 2016/11/22/022.
 * 作者：刘洋
 */
class ProdyctionClientActivity : BaseActivity() {
    lateinit var transaction: FragmentTransaction
    lateinit var mFragmentMan: FragmentManager
    private var id = ""
    private var select = 0
    private var all = ""
    private val a = "ProdyctionClientActivity"
    override fun getLayoutId(): Int {
        activityname = a
        return R.layout.activity_prodyctionclient
    }

    override fun initCreate() {
        initView()
        initData()
    }

    private fun initData() {
        mFragmentMan = supportFragmentManager
        transaction = mFragmentMan.beginTransaction()
        val from = FragmentClientfive()
        Log.d("initData","============="+id)
        from.godata(id, true, this, select, all)
        transaction.add(R.id.fragment, from).commit()
    }

    private fun initView() {
        val intent = intent
        id = intent.getStringExtra("id")
        select = intent.getIntExtra("select", 0)
        all = intent.getStringExtra("all")
        iv_header_left.visibility = View.VISIBLE
        tv_header_title.text = "订单进度详情"
        iv_header_left.setOnClickListener{finish()}
    }
}
